<template>
  <div class='bgClass'>
    <div style='padding:10px;'>
      <div class='content'>
        <div class='login-banner'>
          <div style='flex:1;    text-align: right;padding-right: 15px;    padding-right: 100px;'>
            <img src='@/assets/image/img/leftImg.png' style='    width: 490px;
         margin-top: calc(18vh);'>
          </div>
          <div style='flex:1'>
            <div style='    margin-top: calc(18vh);text-align: center;padding-left: 5%'>
              <div class='title'>
                政府财政服务大平台
              </div>
              <div class='contentWrap'>
                <div class='titleContent'>
                  <div>
                    <div style="margin-top: 25px" >
                      <el-input
                        placeholder="请输入您的账号"
                        prefix-icon="el-icon-user"
                        @blur='onBlur'
                        @keyup.enter.native="onSubmit()"
                        style='width:90%'
                        v-model="account">
                      </el-input>
                    </div>
                    <div style="margin-top: 25px" >
                      <el-input
                        placeholder="请输入您的密码"
                        prefix-icon="el-icon-lock"
                        type="password"
                        @keyup.enter.native="onSubmit()"
                        style='width:90%'
                        v-model="password">
                      </el-input>
                    </div>
                    <div style="margin-top: 25px;display: flex;" id='account1'>
                      <div style='flex:1;    text-align: left;
                        padding-left: 25px;'>
                        <el-checkbox v-model="checked" style="color:#fff;">记住密码</el-checkbox>
                      </div>
                      <div style='flex:1;    text-align: right;
                        color: #fff;
                        padding-right: 18px;'>
                           <span
                             class="lf"
                             style="cursor: pointer;font-size: 14px;margin-left: 20px;font-weight: 500;"
                           >忘记密码？</span>
                      </div>
                    </div>
                    <div style="margin-top: 25px" id='account2'>
                      <el-button
                        type="primary"
                        style="width: 90%; margin-left: 10px;    border-radius: 15px;
                        box-shadow: 0 6px 4px 0 rgba(0,0,0,.12), 0 0 6px 0 rgba(0,0,0,.04);"
                        :loading='isLogin'
                        @click='onSubmit'
                      >登录
                      </el-button>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>

  export default {
    data() {
      return {
        account: '',
        account1: '',
        password: '',
        checked: false,
        isLogin: false
      }
    },
    methods: {
      onBlur() {
        if (this.account == '') {

        } else {

        }
      },

      onSubmit() {
        if (this.account == '') {
          this.$message({
            message: '账号不能为空',
            type: 'warning'
          })
        } else if (this.password == '') {
          this.$message({
            message: '密码不能为空',
            type: 'warning'
          })
        } else {
          this.isLogin = true
          localStorage.setItem('roleId','1')
          this.$router.push({
            path:'/adminPage/home'
          })
        }

      }
    },
    created() {

    }
  }


</script>
<style lang="scss" scoped>
  .bgClass {

    width: calc(100vw);
    height: calc(100vh);
    background: url('../../assets/image/img/bg.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
  }

  .content {
    height: calc(65vh);
    width: 100%;

    display: flex;
  }

  .login-banner {
    width: 1300px;
    height: calc(98vh);
    background-size: 100%;
    margin: auto;
    position: relative;
    display: flex;
  }

  .title {
    font-size: 30px !important;
    font-family: SourceHanSansCN;
    font-weight: bold;
    color: rgba(255, 255, 255, 1);
    line-height: 25px;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.65);
    letter-spacing: 7px;
    display: inline-block;
  }

  .contentWrap {
    margin-top: 20px;
    padding: 20px;
    text-align: center;
  }

  .titleContent {
    height: 330px;
    border: 1px dashed #fff;
    background: url('../../assets/image/img/contentBorder.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    border-radius: 10px;
    width: 410px;
    display: inline-block;
    padding: 20px;
  }

  button:active {
    transform: translateY(3px);
    box-shadow: 0 3px #aaa;
  }


</style>
